home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 6 / Amiga Format AFCD06 (Nov 1996, Issue 90).iso / serious / shareware / misc / vark15 / utils a-o / extract k-n < prev    next >
Text File  |  1996-08-26  |  4KB  |  96 lines

  1. ; crummy multiArchive extractor : By Neil Mohr 
  2. ; $VER: crummy multilzx extractor v1.0b (15:08 28 Jan 1996)
  3. ; Modified by Vark for Vark 15, cos I'm a lazy bastard
  4. ; It's too hot today anyway :)
  5. ;all specified archives must be in the same directory, with lha
  6. ;start with file1, file2 .. don't intersperse entries
  7.  
  8. (complete 0)
  9. (welcome)
  10.  
  11. (if (OR (= (getDevice @icon) "DF0") (= (getDevice @icon) "DF1") (= (getDevice @icon) "DF2"))
  12.     (set originalDisc (getAssign (getDevice @icon) "d")) )
  13. (set @default-dest "")
  14. (set @app-name "")
  15. (set counter 0)
  16. (foreach "" "#?.lha" (set counter (+ counter 1)) )
  17. (set completeVal (+ counter 1))
  18. (set destPrompt "Where do you want the archives extracting?")
  19.  
  20. (user 2)
  21. (message "\n\n\nTo use this installer properly you need\na hard drive, or at "
  22.          "least, plenty of free memory.\n\n\nAlso this icon should be in the same "
  23.          "directory as the archives, and LHA in c: otherwise it will not work!")
  24.  
  25. (set file1  "Kick2File.Lha")
  26. (set file2  "MegaFloppy.Lha")
  27. (set file3  "NFA-AD10.Lha")
  28. (set file4  "NFA-SFW.Lha")
  29. (set file5  "NFA-WRM.Lha")
  30. (set file6  "NHugeBench.Lha")
  31. (set file7  "Non-Vol-Editor.Lha")
  32. (set file8  "NTeddy.Lha")
  33.  
  34. (while (OR (= (getAssign (getDevice @default-dest) "d") originalDisc )
  35.            (= originalDisc "") )
  36.   (set destination
  37.     (askdir (help @askdir-help) (prompt destPrompt)
  38.     (newpath)
  39.     (default "RAM:")
  40.   ))
  41. (set destPrompt "Where do you want the archives extracting?\nBut please don't pick the coverdisc!")
  42. (set @default-dest destination)
  43. )
  44.  
  45.  
  46. (if (NOT (= (substr @default-dest (- (strlen @default-dest) 1) 1) ":")) (set @default-dest (cat @default-dest "/")))
  47.  
  48. (if (= (getDevice @default-dest) "RAM")
  49.   (if (< (+(dataBase "total-mem")) 1000000) (message "\n\n\nYou may not have enough memory.\n\nPress proceed to try anyway."))
  50.   (if (< (getDiskSpace @default-dest)) 1000000 (message "\n\n\nYou may not have enough disc space.\n\nPress proceed to try anyway."))
  51. )
  52.  
  53. (set response (askoptions (prompt "Pick which archives to extract.") (help @askoptions-help) (choices
  54.  
  55. file1
  56. file2
  57. file3
  58. file4
  59. file5
  60. file6
  61. file7
  62. file8
  63.  
  64. )) )
  65.  
  66. (set counter (- counter 1))
  67.  
  68. (until (= counter -1)
  69.  
  70.   (if (IN response counter) ((set @app-name file8)  (set response (- response 128)) ))
  71.   (if (IN response counter) ((set @app-name file7)  (set response (- response 64)) ))
  72.   (if (IN response counter) ((set @app-name file6)  (set response (- response 32)) ))
  73.   (if (IN response counter) ((set @app-name file5)  (set response (- response 16)) ))
  74.   (if (IN response counter) ((set @app-name file4)  (set response (- response 8)) ))
  75.   (if (IN response counter) ((set @app-name file3)  (set response (- response 4)) ))
  76.   (if (IN response counter) ((set @app-name file2)  (set response (- response 2)) ))
  77.   (if (IN response counter) ((set @app-name file1)  (set response (- response 1)) ))
  78.  
  79.   (if (NOT (= @app-name ""))
  80.     ( (complete (* (- completeVal counter ) (/ 100 completeVal)) )
  81.       (working "\n\n\nI am now extracting " @app-name " to " @default-dest ".\n\nPlease Wait.")
  82.       (set unArc (cat "c:lha x -m -x \"" @app-name "\" \"" @default-dest "\""))
  83.       (if (> (run unArc) 0)  (message "lha reported an error when extracting\n" @app-name " to the destination path " @default-dest ".\n\nThis could either be a problem with how\nyour computer is setup or with the disk itself.\nTry running the HD-Setup Icon, and make sure you are running MultiExtract from the cover disk, it may be the destination " @default-dest " does not have enought room.\n\nIf problems persist ring 01625 878888 and ask for Amiga Computing Technical Help.\n\nPress Proceed To Continue." ))
  84.     )
  85.   )
  86.  
  87.   (set counter (- counter 1))
  88.   (set @app-name "")
  89.  
  90. )
  91.  
  92. (complete 100)
  93. (message "\n\n\n\nHopefully all your chosen files\nhave been extracted correctly!\n\nand can be found in " @default-dest)
  94.  
  95. (exit (quiet))
  96.